import request, {get, post} from '../utils/request.js'

export function getTemplateById(id){
  return get('/support/template/getTemplateById',{
    templateId: id
  })
}

export function getUnits(centerCode = 'work_order_center'){
  return get('/support/template/getUnits', {centerCode}, {
    noAccessParams: true
  })
}

export const selectCategories = (data) => {
  return request({
    url: '/support/category/selectCategories',
    method: 'post',
    data: {
      systemCode: sessionStorage.systemCode,
      ...data
    }
  })
}
